package com.ruoyi.web.controller.mall;

import com.ruoyi.system.mc.annotations.McLogAn;
import com.ruoyi.system.mc.entity.McShopCart;
import com.ruoyi.system.mc.service.McShopCartService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/*
 *  @author 雨安
 *  类名： McShopCartController
 *  创建时间：2024/5/29
 */
@RestController//返回 json 或 字符串格式数据
@RequestMapping(value = "/mc/shop/car/api")//访问前缀名
public class McShopCartController {

    //购物车表
    @Resource
    private McShopCartService mcShopCartService;


    /**
     * 添加Api
     * @param mcShopCart 添加对象
     * @return 返回添加结果
     */
    @PostMapping("/insert")
    @McLogAn(logContent = "添加商品到购物车",businessType = "添加",requestMethod = "POST")
    public String insertShopCar(McShopCart mcShopCart){
        //调用Service层
        return mcShopCartService.insertShopCar(mcShopCart);
    }





}
